//
//  Boy.m
//  chapter4
//
//  Created by iGxnon on 2021/11/7.
//

#import "Boy.h"

@interface Boy ()

@property (nonatomic, assign) double height;

- (int) convertHeightToCm;

@end


@implementation Boy

- (instancetype)initWithName: (NSString *) name withAge: (int) age withHeight: (double) height {
    self = [super init];
    if (self) {
        self.name = name;
        self.height = height;
        self.age = age;
    }
    if (self.convertHeightToCm < 160) {
        NSLog(@"%@: 呜呜呜，拉垮了", self.name);
    }
    return self;
}

- (int) convertHeightToCm {
    return (int)(self.height * 100);
}

@end
